package com.bq.controller;

import com.bq.mapper.UserMapper;
import com.bq.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by Administrator on 2017/6/28 0028.
 */
@RestController
@RequestMapping({"/home"})
public class UserController {
    @Autowired
    UserMapper userMapper;

    @RequestMapping(value = "/user")
    @ResponseBody
    public List<User> user(){
        List<User> users = userMapper.findUsers();
        return users;
    }
}
